//
// @Author: Zhenwei Xiao
// @Description:
// @Version: 1.0.0
// @Date: 2021/4/9 上午9:34
// @Copyright: MIN-Group；国家重大科技基础设施——未来网络北大实验室；深圳市信息论与未来网络重点实验室
//

const stream_transport = require("./StreamTransport")
class UnixStreamTransport extends stream_transport.StreamTransport{
    constructor(st) {
        super(st)
    }

    //
    // @Description:  初始化UnixTransport
    // @receiver t
    // @param conn net.Conn
    //
    Init(conn) {
        this.conn = conn
        // Q怎么获取本地地址
        this.localAddr = conn.localAddress
        this.localUri = "unix://" + this.localAddr
        this.remoteAddr = conn.remoteAddress
        this.remoteUri = "unix://" + this.remoteAddr
        this.recvBuf = new Buffer.alloc(1024*1028*4)
        this.recvLen = 0
    }
}

module.exports = {
    UnixStreamTransport: UnixStreamTransport
}

